#!/bin/sh

i = 1
PRE = test

while [ $i -le 5 ]
do
    useradd $PRE$i
    echo "123" | passwd --stdin $PRE$i &> /dev/null
    let i++
done

cat /etc/passwd | grep test

